import "./product.css";
import { getData, getDelayedData } from "../../../../api/getData";
import render from "./items.art";

const icod = "JFCE9A7762D05E0A4";

const productURL = `https://www.imooc.com/api/mall-wepApp/index/product?icode=${icod}`;

// document.querySelector("#product-list").innerHTML = render({});
// console.log(productURL);
getData(productURL)
  .then((data) => {
    document.querySelector("#product-list").innerHTML = render({
      productData: data,
    });
  })
  .catch((err) => {
    console.log(err);
  });
